ngl: move uniform key mapping into uniform state
authorChristian Hergert <chergert@redhat.com>
Tue, 23 Mar 2021 19:10:12 +0000 (12:10 -0700)
committerChristian Hergert <chergert@redhat.com>
Tue, 23 Mar 2021 20:44:26 +0000 (13:44 -0700)
commitf8a6a09896139f6b9ba6b01e7c76cf4f94f8a7e4
treeffd12df80f7416fd7a436babae953f4ebd023de1
parent1f6b556972362b1a45a15a907eaf9d8ba90a94d3
ngl: move uniform key mapping into uniform state

Previously, we translated the uniform key (an enum) into a location within
the shader program in GskNglProgram. A number of performance improvements
were focused around having low nubers for the uniform locations. Generally
this is the case, but some drivers such as old Intel drivers on Windows
may use rather large numbers for those.

To combat this, we can push the translation of uniform keys into locations
at the GskNglUniformState level so that we work with unranslated keys
through the process until applying them.

Fixes #3780
gsk/ngl/gsknglcommandqueue.c
gsk/ngl/gsknglcommandqueueprivate.h
gsk/ngl/gskngldriver.c
gsk/ngl/gskngldriverprivate.h
gsk/ngl/gsknglprogram.c
gsk/ngl/gsknglprogramprivate.h
gsk/ngl/gsknglrenderjob.c
gsk/ngl/gskngluniformstate.c
gsk/ngl/gskngluniformstateprivate.h